<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
    <th:block th:include="include :: header('异常打卡列表')" />
</head>
<body class="gray-bg">
     <div class="container-div">
        <div class="row">
            <div class="col-sm-12 search-collapse">
                <form id="abnormal-clock-form">
                    <div class="select-list">
                        <ul>
                            <li>
                                <label>打卡日期：</label>
                                <input type="text" class="time-input" placeholder="请选择打卡日期" name="clockDate"/>
                            </li>
                            <li>
                                <label>打卡星期：</label>
                                <input type="text" name="clockWeek"/>
                            </li>
                            <li>
                                <label>打卡时间：</label>
                                <input type="text" name="clockTime"/>
                            </li>
                            <li>
                                <label>打卡次数：</label>
                                <input type="text" name="numberOdClocks"/>
                            </li>
                            <li>
                                <label>补卡时间：</label>
                                <input type="text" class="time-input" placeholder="请选择补卡时间" name="replacementCardTime"/>
                            </li>
                            <li>
                                <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
                                <a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i>&nbsp;重置</a>
                            </li>
                        </ul>
                    </div>
                </form>
            </div>

            <div class="btn-group-sm" id="toolbar" role="group">
                <a class="btn btn-warning" onclick="$.table.exportExcel()">
                    <i class="fa fa-download"></i> 导出
                </a>
            </div>
            <div class="col-sm-12 select-table table-striped">
                <table id="bootstrap-table"></table>
            </div>
        </div>
    </div>
    <th:block th:include="include :: footer" />
    <script th:inline="javascript">
        // var editFlag = [[${@permission.hasPermi('system:clock:edit')}]];
        // var removeFlag = [[${@permission.hasPermi('system:clock:remove')}]];
        var datas = [[${@dict.getType('sys_clock_status')}]];
        var prefix = ctx + "system/clock";

        $(function() {
            var options = {
                url: prefix + "/listAbnormalClocks",
                updateUrl: prefix + "/edit/{id}",
                removeUrl: prefix + "/remove",
                exportUrl: prefix + "/export",
                modalName: "考勤异常数据",
                columns: [{
                    checkbox: false
                },
                    {
                        field: 'clockId',
                        title: '序号',
                        visible: true
                    },
                    {
                        field: 'clockDate',
                        title: '打卡日期'
                    },
                    {
                        field: 'clockWeek',
                        title: '打卡星期'
                    },
                    {
                        field: 'clockTime',
                        title: '打卡时间'
                    },
                    {
                        field: 'clockState',
                        title: '打卡状态',
                        formatter: function(value, row, index) {
                            return $.table.selectDictLabel(datas, value);
                        }
                    },
                    {
                        field: 'numberOdClocks',
                        title: '打卡次数'
                    },
                    {
                        field: 'replacementCardTime',
                        title: '补卡时间'
                    },
                    {
                        field: 'personnelId',
                        title: '员工编号',
                        visible: false
                    },{
                        field: 'tenantId',
                        title: '租户编号',
                        visible: false
                    }
                ]
            };
            $.table.init(options);
        });
    </script>
</body>
</html>